<?php
$dmtrangchu = $tc->DanhMucTrangChu();
while($row_dmtrangchu = mysql_fetch_array($dmtrangchu)) {
	$view_post .= "
	<div class='boxleft'>
        <div class='titleleft'></div>
        <div class='titlecenter'><a href='{$row_dmtrangchu['url']}'>{$row_dmtrangchu['name']}</a></div>
        <div class='titleright'></div>
        <div style='clear:both'></div>
	";
	$idMenuTC = $row_dmtrangchu['id'];
	$baiviettrangchu = $tc->BaiVietTrangChu($idMenuTC);
	while($row_baiviettrangchu = mysql_fetch_array($baiviettrangchu)) {
		$view_post .= "
		<div class='item'>
            <a href='{$row_dmtrangchu[url]}{$row_baiviettrangchu['name_rewrite']}.html'><h2>{$row_baiviettrangchu['name']}</h2></a>
			<img src='".url_detail_thumb_image."{$row_baiviettrangchu['url_hinh']}' alt='{$row_baiviettrangchu['name']}' />
			<h5>{$row_baiviettrangchu['description']}</h5>
        </div>
		";
	}
	mysql_free_result($baiviettrangchu);
	$view_post .= "
        <div style='clear:both; height:8px'></div>
    </div>
	";
}
mysql_free_result($dmtrangchu);
?>